/*
 * Copyright (C) 2015 备胎金服
 * 未经授权允许不得进行拷贝和修改
 *   http://www.btjf.com/
 */
package com.zhangman.androidgame;

import com.zhangman.framework.Game;
import com.zhangman.framework.Graphics;
import com.zhangman.framework.Screen;

/**
 * Created by zhangman on 2016/11/1 14:46.
 * Email: zhangman523@126.com
 */
public class LoadingScreen extends Screen {

  public LoadingScreen(Game game) {
    super(game);
  }

  @Override public void update(float deltaTime) {
    Graphics graphics = mGame.getGraphics();
    Assets.menu = graphics.newImage("menu.png", Graphics.ImageFormat.RGB565);
    Assets.background = graphics.newImage("background.png", Graphics.ImageFormat.ARGB4444);
    Assets.character = graphics.newImage("character.png", Graphics.ImageFormat.ARGB4444);
    Assets.character2 = graphics.newImage("character2.png", Graphics.ImageFormat.ARGB4444);
    Assets.character3 = graphics.newImage("character3.png", Graphics.ImageFormat.ARGB4444);
    Assets.characterJump = graphics.newImage("jumped.png", Graphics.ImageFormat.ARGB4444);
    Assets.characterDown = graphics.newImage("down.png", Graphics.ImageFormat.ARGB4444);

    Assets.heliboy = graphics.newImage("heliboy.png", Graphics.ImageFormat.ARGB4444);
    Assets.heliboy2 = graphics.newImage("heliboy2.png", Graphics.ImageFormat.ARGB4444);
    Assets.heliboy3 = graphics.newImage("heliboy3.png", Graphics.ImageFormat.ARGB4444);
    Assets.heliboy4 = graphics.newImage("heliboy4.png", Graphics.ImageFormat.ARGB4444);
    Assets.heliboy5 = graphics.newImage("heliboy5.png", Graphics.ImageFormat.ARGB4444);

    Assets.tiledirt = graphics.newImage("tiledirt.png", Graphics.ImageFormat.RGB565);
    Assets.tilegrassTop = graphics.newImage("tilegrasstop.png", Graphics.ImageFormat.RGB565);
    Assets.tilegrassBot = graphics.newImage("tilegrassbot.png", Graphics.ImageFormat.RGB565);
    Assets.tilegrassLeft = graphics.newImage("tilegrassleft.png", Graphics.ImageFormat.RGB565);
    Assets.tilegrassRight = graphics.newImage("tilegrassright.png", Graphics.ImageFormat.RGB565);

    Assets.button = graphics.newImage("button.jpg", Graphics.ImageFormat.RGB565);
    //This is how you would load a sound if you had one
    //Assets.click = game.getAudio().createSound("explode.ogg")

    mGame.setScreen(new MainMenuScreen(mGame));
  }

  @Override public void pain(float deltaTime) {
    Graphics g = mGame.getGraphics();
    g.drawImage(Assets.splash, 0, 0);
  }

  @Override public void pause() {

  }

  @Override public void resume() {

  }

  @Override public void dispose() {

  }

  @Override public void backButton() {

  }
}
